#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QObject>
#include <QThread>
#include <QTcpSocket>

class MyThread : public QThread
{
    Q_OBJECT
public:
    explicit MyThread(qintptr id, QObject* parent = 0);
    ~MyThread();
    void run();

signals:
    void error(QTcpSocket::SocketError socketError);

public slots:
    void readyRead();
    void disconnect();

private:
    qintptr socketDescriptor;
    QTcpSocket* socket;
};

#endif // MYTHREAD_H
